XML: myServices
This documentation describes the XML format of myChannels.opml,
myStrips.opml and myWebCams.opml, which keep track of a user's
subscriptions to various services. As the file extension suggests,
this document is based off the OPML format, described in some detail
at http://www.opml.org/.
Furthermore, the xml is loosely based off Dave Winer's
mySubscriptions.opml
to provide further compatibility between AmphetaDesk and
Radio Userland on the Desktop.
A complete (yet rather minimal) myChannels.opml file is shown
below (myStrips.opml and myWebCams.opml have the same syntax). We've broken
up the attributes onto multiple lines for readability.
<?xml version="1.0"?>
<opml>
<body>
<outline description="The best little example description around!"
filename="thebestlittleexample.xml"
htmlurl="http://www.superlugnuts.com/example.htm"
imageurl="http://www.superlugnuts.com/image.jpg"
title="Super LugNuts and Happy Examples"
xmlurl="http://www.superlugnuts.com/example.xml"
/>
</body>
</opml>
|
The user of this myChannels.opml subscribes to the RSS feed from the fictional SuperLugNuts..
Note that this is not perfectly valid OPML as it does not contain a <head> element.
description
Allowed Within: <outline>
Frequency: Once
Required: No
The "description" attribute is determined by the actual
subscribed service and can be a string of any length. Most of the
time, the service author will put a little blurb about the service
- others will put the last modified date of the service.
|
filename
Allowed Within: <outline>
Frequency: Once
Required: Yes (myChannels.opml); No (myStrips.opml, myWebCams.opml)
The "filename" attribute contains up to a 20 letter filename,
ending with ".xml" to make 24 in total (24 is close to the maximum
filename length on Macintosh's). This entry points to the filename
where the channel data is stored (for example, ~/data/channels/filename.xml)
and is determined each time the myChannels.opml file is
recreated.
Developers can automatically create a valid channel filename by
calling &create_channel_filename (located in
~/lib/Channels.pl) with the channel's title as it's only
parameter. To create a "unique" filename, we remove nonword
characters, lowercase anything remaining, chop the remaining
string to 20 characters, and then chalk on ".xml". This isn't
perfectly unique, but it has proven good enough in beta testing.
|
htmlurl
Allowed Within: <outline>
Frequency: Once
Required: No
See Also: imageurl, xmlurl
Convincingly enough, the "htmlurl" attribute contains the full
URI to the webpage of the service in question.
|
imageurl
Allowed Within: <outline>
Frequency: Once
Required: Yes (myWebCams.opml, myStrips.opml); No (myChannels.opml)
See Also: htmlurl, xmlurl
Although "imageurl" sounds easy enough, there is a bit of
confusion concerning what exactly it means in different contexts.
In myChannels.opml, it means nothing, and you'll never see it.
If, on the other hand, you're messing with myStrips.opml
and myWebCams.opml, the "imageurl" points to the URI of the comic
strip or webcam image in question.
|
<outline>
Allowed Within: <body>
Frequency: Multiple
Required: Yes
From the OPML spec: "An <outline> is an XML element,
possibly containing one or more attributes, and containing any
number of <outline> sub-elements.". In this regard, our
<outline> element defines a single service subscription,
with attributes describing that service.
|
title
Allowed Within: <outline>
Frequency: Once
Required: Yes
"title" showcases the title or name of the service in question and can be any length.
|
xmlurl
Allowed Within: <outline>
Frequency: Once
Required: Yes (myChannels.opml); No (myWebCams.opml, myStrips.opml)
See Also: htmlurl, imageurl
"xmlurl" is the full URI to the document that contains the
channel xml. It's ignored for myStrips.opml and myWebCams.opml.
|
Any questions about the above? Email morbus@disobey.com.
This footer was last updated 05/24/01; odds are the whole document was too.
|